package sample.retrofit

import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.scala.DefaultScalaModule
import retrofit.RestAdapter
import retrofit.RestAdapter.Builder
import retrofit.converter.JacksonConverter

/**
 * Created on 2015/6/21.
 *
 * @author Misty
 */
object Adapter {
    val mapper = new ObjectMapper()
    mapper.registerModule(DefaultScalaModule)

    val adapter = new Builder()
      .setEndpoint("http://localhost:3000/api")
      .setConverter(new JacksonConverter(mapper))
      .setLogLevel(RestAdapter.LogLevel.FULL)
      .build()
}
